package com.feituan.core.persistence.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.feituan.core.pojo.entity.Order;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xiaohu
 * @since 2024-05-09
 */
@Mapper
public interface OrderMapper extends BaseMapper<Order> {
    List<Order> findByUser(@Param("userId") Long id,
                           @Param("type") Integer type,
                           @Param("lastId") Long lastId,
                           @Param("orderStatus")Integer orderStatus);

    /**
     * 根据订单号查询
     * @param orderSn orderSn
     */
    Order selectByOrderSn(@Param("orderSn") String orderSn);
}
